﻿export const areaCodeJson = [
    {
        "countrys": [
            {
                "name": "中国大陆",
                "number": "+86"
            },
            {
                "name": "中国香港",
                "number": "+852"
            },
            {
                "name": "中国澳门",
                "number": "+853"
            }
        ],
        "name": "常用地区"
    },
    {
        "countrys": [
            {
                "name": "埃及",
                "number": "+20"
            },
            {
                "name": "奥地利",
                "number": "+43"
            },
            {
                "name": "阿根廷",
                "number": "+54"
            },
            {
                "name": "澳洲",
                "number": "+61"
            },
            {
                "name": "阿富汗",
                "number": "+93"
            },
            {
                "name": "阿尔及利亚",
                "number": "+213"
            },
            {
                "name": "安哥拉",
                "number": "+244"
            },
            {
                "name": "阿森松岛",
                "number": "+247"
            },
            {
                "name": "埃塞俄比亚",
                "number": "+251"
            },
            {
                "name": "阿鲁巴 (荷兰王国)",
                "number": "+297"
            },
            {
                "name": "爱尔兰共和国",
                "number": "+353"
            },
            {
                "name": "阿尔巴尼亚",
                "number": "+355"
            },
            {
                "name": "爱沙尼亚",
                "number": "+372"
            },
            {
                "name": "安道尔",
                "number": "+376"
            },
            {
                "name": "阿曼",
                "number": "+968"
            },
            {
                "name": "阿拉伯联合酋长国",
                "number": "+971"
            },
            {
                "name": "阿塞拜疆",
                "number": "+994"
            },
            {
                "name": "安圭拉",
                "number": "+1264"
            },
            {
                "name": "安提瓜和巴布达",
                "number": "+1268"
            }
        ],
        "name": "a"
    },
    {
        "countrys": [
            {
                "name": "比利时",
                "number": "+32"
            },
            {
                "name": "波兰",
                "number": "+48"
            },
            {
                "name": "巴西",
                "number": "+55"
            },
            {
                "name": "巴基斯坦",
                "number": "+92"
            },
            {
                "name": "布基纳法索",
                "number": "+226"
            },
            {
                "name": "贝宁",
                "number": "+229"
            },
            {
                "name": "布隆迪",
                "number": "+257"
            },
            {
                "name": "博茨瓦纳",
                "number": "+267"
            },
            {
                "name": "冰岛",
                "number": "+354"
            },
            {
                "name": "保加利亚",
                "number": "+359"
            },
            {
                "name": "白俄罗斯",
                "number": "+375"
            },
            {
                "name": "波斯尼亚与赫塞哥维纳",
                "number": "+387"
            },
            {
                "name": "伯利兹",
                "number": "+501"
            },
            {
                "name": "巴拿马",
                "number": "+507"
            },
            {
                "name": "玻利维亚",
                "number": "+591"
            },
            {
                "name": "巴拉圭",
                "number": "+595"
            },
            {
                "name": "博内尔岛，圣尤斯特歇斯和",
                "number": "+599"
            },
            {
                "name": "巴布亚新几内亚",
                "number": "+675"
            },
            {
                "name": "巴勒斯坦",
                "number": "+930"
            },
            {
                "name": "巴林",
                "number": "+973"
            },
            {
                "name": "不丹",
                "number": "+975"
            },
            {
                "name": "巴哈马",
                "number": "+1242"
            },
            {
                "name": "巴巴多斯",
                "number": "+1246"
            },
            {
                "name": "百慕大 (英国)",
                "number": "+1441"
            },
            {
                "name": "波多黎各 (美国)",
                "number": "+1787"
            }
        ],
        "name": "b"
    },
    {
        "countrys": [
            {
                "name": "查德",
                "number": "+235"
            },
            {
                "name": "赤道几内亚",
                "number": "+240"
            }
        ],
        "name": "c"
    },
    {
        "countrys": [
            {
                "name": "丹麦",
                "number": "+45"
            },
            {
                "name": "德国",
                "number": "+49"
            },
            {
                "name": "多哥",
                "number": "+228"
            },
            {
                "name": "东帝汶",
                "number": "+670"
            },
            {
                "name": "东加",
                "number": "+676"
            },
            {
                "name": "多米尼克",
                "number": "+1767"
            },
            {
                "name": "多米尼加共和国",
                "number": "+1809"
            }
        ],
        "name": "d"
    },
    {
        "countrys": [
            {
                "name": "俄罗斯",
                "number": "+7"
            },
            {
                "name": "厄瓜多尔",
                "number": "+593"
            }
        ],
        "name": "e"
    },
    {
        "countrys": [
            {
                "name": "法国",
                "number": "+33"
            },
            {
                "name": "菲律宾",
                "number": "+63"
            },
            {
                "name": "佛得角",
                "number": "+238"
            },
            {
                "name": "法罗群岛 (丹麦)",
                "number": "+298"
            },
            {
                "name": "芬兰",
                "number": "+358"
            },
            {
                "name": "法属圭亚那 (法国)",
                "number": "+594"
            },
            {
                "name": "法属波利尼西亚 (法国)",
                "number": "+689"
            },
            {
                "name": "斐济",
                "number": "+679"
            }
        ],
        "name": "f"
    },
    {
        "countrys": [
            {
                "name": "古巴",
                "number": "+53"
            },
            {
                "name": "哥伦比亚",
                "number": "+57"
            },
            {
                "name": "冈比亚",
                "number": "+220"
            },
            {
                "name": "刚果共和国",
                "number": "+242"
            },
            {
                "name": "刚果民主共和国",
                "number": "+243"
            },
            {
                "name": "格陵兰 (丹麦)",
                "number": "+299"
            },
            {
                "name": "哥斯达黎加",
                "number": "+506"
            },
            {
                "name": "瓜德罗普岛",
                "number": "+590"
            },
            {
                "name": "圭亚那",
                "number": "+592"
            },
            {
                "name": "格林纳达",
                "number": "+1473"
            },
            {
                "name": "关岛 (美国)",
                "number": "+1671"
            }
        ],
        "name": "g"
    },
    {
        "countrys": [
            {
                "name": "哈萨克",
                "number": "+7"
            },
            {
                "name": "荷兰",
                "number": "+31"
            },
            {
                "name": "韩国",
                "number": "+82"
            },
            {
                "name": "黑山共和国",
                "number": "+382"
            },
            {
                "name": "洪都拉斯",
                "number": "+504"
            },
            {
                "name": "海地",
                "number": "+509"
            }
        ],
        "name": "h"
    },
    {
        "countrys": [
            {
                "name": "加拿大",
                "number": "+1"
            },
            {
                "name": "几内亚",
                "number": "+224"
            },
            {
                "name": "加纳",
                "number": "+233"
            },
            {
                "name": "加蓬",
                "number": "+241"
            },
            {
                "name": "几内亚比绍",
                "number": "+245"
            },
            {
                "name": "吉布提",
                "number": "+253"
            },
            {
                "name": "津巴布韦",
                "number": "+263"
            },
            {
                "name": "捷克",
                "number": "+420"
            },
            {
                "name": "基里巴斯",
                "number": "+686"
            },
            {
                "name": "柬埔寨",
                "number": "+855"
            },
            {
                "name": "吉尔吉斯",
                "number": "+996"
            }
        ],
        "name": "j"
    },
    {
        "countrys": [
            {
                "name": "科特迪瓦",
                "number": "+225"
            },
            {
                "name": "喀麦隆",
                "number": "+237"
            },
            {
                "name": "肯尼亚",
                "number": "+254"
            },
            {
                "name": "科摩罗",
                "number": "+269"
            },
            {
                "name": "克罗地亚",
                "number": "+385"
            },
            {
                "name": "库拉索 (荷兰王国)",
                "number": "+599"
            },
            {
                "name": "库克群岛 (新西兰)",
                "number": "+682"
            },
            {
                "name": "科威特",
                "number": "+965"
            },
            {
                "name": "卡达",
                "number": "+974"
            },
            {
                "name": "开曼群岛 (英国)",
                "number": "+1345"
            }
        ],
        "name": "k"
    },
    {
        "countrys": [
            {
                "name": "罗马尼亚",
                "number": "+40"
            },
            {
                "name": "利比亚",
                "number": "+218"
            },
            {
                "name": "利比里亚",
                "number": "+231"
            },
            {
                "name": "卢旺达",
                "number": "+250"
            },
            {
                "name": "留尼汪 (法国)",
                "number": "+262"
            },
            {
                "name": "莱索托",
                "number": "+266"
            },
            {
                "name": "卢森堡",
                "number": "+352"
            },
            {
                "name": "立陶宛",
                "number": "+370"
            },
            {
                "name": "拉脱维亚",
                "number": "+371"
            },
            {
                "name": "列支敦士登",
                "number": "+423"
            },
            {
                "name": "老挝",
                "number": "+856"
            },
            {
                "name": "黎巴嫩",
                "number": "+961"
            }
        ],
        "name": "l"
    },
    {
        "countrys": [
            {
                "name": "美国",
                "number": "+1"
            },
            {
                "name": "秘鲁",
                "number": "+51"
            },
            {
                "name": "墨西哥",
                "number": "+52"
            },
            {
                "name": "马来西亚",
                "number": "+60"
            },
            {
                "name": "缅甸",
                "number": "+95"
            },
            {
                "name": "摩洛哥",
                "number": "+212"
            },
            {
                "name": "毛里塔尼亚",
                "number": "+222"
            },
            {
                "name": "马里共和国",
                "number": "+223"
            },
            {
                "name": "毛里求斯",
                "number": "+230"
            },
            {
                "name": "莫桑比克",
                "number": "+258"
            },
            {
                "name": "马达加斯加",
                "number": "+261"
            },
            {
                "name": "马拉维",
                "number": "+265"
            },
            {
                "name": "马约特",
                "number": "+269"
            },
            {
                "name": "马其顿",
                "number": "+389"
            },
            {
                "name": "马耳他",
                "number": "+356"
            },
            {
                "name": "摩尔多瓦",
                "number": "+373"
            },
            {
                "name": "摩纳哥",
                "number": "+377"
            },
            {
                "name": "马提尼克 (法国)",
                "number": "+596"
            },
            {
                "name": "孟加拉国",
                "number": "+880"
            },
            {
                "name": "马尔代夫",
                "number": "+960"
            },
            {
                "name": "蒙古国",
                "number": "+976"
            },
            {
                "name": "美属维尔京群岛 (美国)",
                "number": "+1340"
            },
            {
                "name": "蒙塞拉特岛 (英国)",
                "number": "+1664"
            },
            {
                "name": "美属萨摩亚 (美国)",
                "number": "+1684"
            }
        ],
        "name": "m"
    },
    {
        "countrys": [
            {
                "name": "南非",
                "number": "+27"
            },
            {
                "name": "挪威",
                "number": "+47"
            },
            {
                "name": "南苏丹",
                "number": "+211"
            },
            {
                "name": "尼日",
                "number": "+227"
            },
            {
                "name": "尼日利亚",
                "number": "+234"
            },
            {
                "name": "纳米比亚",
                "number": "+264"
            },
            {
                "name": "尼加拉瓜",
                "number": "+505"
            },
            {
                "name": "尼泊尔",
                "number": "+977"
            }
        ],
        "name": "n"
    },
    {
        "countrys": [
            {
                "name": "葡萄牙",
                "number": "+351"
            },
            {
                "name": "帕劳",
                "number": "+680"
            }
        ],
        "name": "p"
    },
    {
        "countrys": [
            {
                "name": "乔治亚",
                "number": "+995"
            }
        ],
        "name": "q"
    },
    {
        "countrys": [
            {
                "name": "瑞士",
                "number": "+41"
            },
            {
                "name": "瑞典",
                "number": "+46"
            },
            {
                "name": "日本",
                "number": "+81"
            }
        ],
        "name": "r"
    },
    {
        "countrys": [
            {
                "name": "斯里兰卡",
                "number": "+94"
            },
            {
                "name": "塞内加尔",
                "number": "+221"
            },
            {
                "name": "狮子山共和国",
                "number": "+232"
            },
            {
                "name": "圣多美普林西比",
                "number": "+239"
            },
            {
                "name": "塞舌尔",
                "number": "+248"
            },
            {
                "name": "苏丹",
                "number": "+249"
            },
            {
                "name": "索马里",
                "number": "+252"
            },
            {
                "name": "斯威士兰",
                "number": "+268"
            },
            {
                "name": "塞浦路斯",
                "number": "+357"
            },
            {
                "name": "圣马力诺",
                "number": "+378"
            },
            {
                "name": "塞尔维亚共和国",
                "number": "+381"
            },
            {
                "name": "斯洛文尼亚",
                "number": "+386"
            },
            {
                "name": "斯洛伐克",
                "number": "+421"
            },
            {
                "name": "萨尔瓦多",
                "number": "+503"
            },
            {
                "name": "圣皮耶与密克隆群岛 (法国)",
                "number": "+508"
            },
            {
                "name": "圣马丁岛(荷兰部分)",
                "number": "+590"
            },
            {
                "name": "苏里南",
                "number": "+597"
            },
            {
                "name": "所罗门群岛",
                "number": "+677"
            },
            {
                "name": "萨摩亚",
                "number": "+685"
            },
            {
                "name": "沙特阿拉伯",
                "number": "+966"
            },
            {
                "name": "圣卢西亚",
                "number": "+1758"
            },
            {
                "name": "圣文森及格林纳丁",
                "number": "+1784"
            },
            {
                "name": "圣克里斯多福与尼维斯",
                "number": "+1869"
            }
        ],
        "name": "s"
    },
    {
        "countrys": [
            {
                "name": "泰国",
                "number": "+66"
            },
            {
                "name": "土耳其",
                "number": "+90"
            },
            {
                "name": "突尼斯",
                "number": "+216"
            },
            {
                "name": "坦桑尼亚",
                "number": "+255"
            },
            {
                "name": "台湾",
                "number": "+886"
            },
            {
                "name": "塔吉克",
                "number": "+992"
            },
            {
                "name": "土库曼",
                "number": "+993"
            },
            {
                "name": "土克凯可群岛 (英国)",
                "number": "+1649"
            },
            {
                "name": "特立尼达和多巴哥",
                "number": "+1868"
            }
        ],
        "name": "t"
    },
    {
        "countrys": [
            {
                "name": "委内瑞拉",
                "number": "+58"
            },
            {
                "name": "乌干达",
                "number": "+256"
            },
            {
                "name": "乌克兰",
                "number": "+380"
            },
            {
                "name": "危地马拉",
                "number": "+502"
            },
            {
                "name": "乌拉圭",
                "number": "+598"
            },
            {
                "name": "文莱",
                "number": "+673"
            },
            {
                "name": "瓦努阿图",
                "number": "+678"
            },
            {
                "name": "乌兹别克",
                "number": "+998"
            }
        ],
        "name": "w"
    },
    {
        "countrys": [
            {
                "name": "希腊",
                "number": "+30"
            },
            {
                "name": "西班牙",
                "number": "+34"
            },
            {
                "name": "匈牙利",
                "number": "+36"
            },
            {
                "name": "新西兰",
                "number": "+64"
            },
            {
                "name": "新加坡",
                "number": "+65"
            },
            {
                "name": "新喀里多尼亚 (法国)",
                "number": "+687"
            },
            {
                "name": "叙利亚",
                "number": "+963"
            }
        ],
        "name": "x"
    },
    {
        "countrys": [
            {
                "name": "意大利",
                "number": "+39"
            },
            {
                "name": "英国",
                "number": "+44"
            },
            {
                "name": "印度尼西亚",
                "number": "+62"
            },
            {
                "name": "越南",
                "number": "+84"
            },
            {
                "name": "印度",
                "number": "+91"
            },
            {
                "name": "伊朗",
                "number": "+98"
            },
            {
                "name": "亚美尼亚",
                "number": "+374"
            },
            {
                "name": "约旦",
                "number": "+962"
            },
            {
                "name": "伊拉克",
                "number": "+964"
            },
            {
                "name": "也门",
                "number": "+967"
            },
            {
                "name": "以色列",
                "number": "+972"
            },
            {
                "name": "英属维尔京群岛 (英国)",
                "number": "+1284"
            },
            {
                "name": "牙买加",
                "number": "+1876"
            }
        ],
        "name": "y"
    },
    {
        "countrys": [
            {
                "name": "智利",
                "number": "+56"
            },
            {
                "name": "中非共和国",
                "number": "+236"
            },
            {
                "name": "赞比亚",
                "number": "+260"
            },
            {
                "name": "直布罗陀 (英国)",
                "number": "+350"
            }
        ],
        "name": "z"
    }
]

//加载手机号码中的区号    张伟
function loadAreaPhone(id,code) {
    for (var key in areaCodeJson) {
        var childrenCode = areaCodeJson[key];
        for (var c1 in childrenCode) {
            var childrenCode2 = childrenCode[c1];
            for (var c2 in childrenCode2) {
                if (childrenCode2[c2]["name"]) {
                    var selects = "<span>" + childrenCode2[c2]["name"] + childrenCode2[c2]["number"] + "</span>";
                    if (c2 == 0) $("#" + id).append("<option selected='seleted' value='" + childrenCode2[c2]["number"] + "'>" + selects + "</option>");
                    else $("#" + id).append("<option value='" + childrenCode2[c2]["number"] + "'>" + selects + "</option>");
                }
            }
        }
    }
    //    $("#" + id).get(0).selectedIndex = 0;
    $("#" + id).val(code);
}